package 富婆梦.第一阶段.第四周.作业;

/**
 * @ProjectName: java-learning
 * @Package: 富婆梦.第一阶段.第四周.作业
 * @ClassName: HighSpeedrail
 * @Author: hemengjin
 * @Description: 高铁类，继承Railway类
 * @Date:2021/8/1 18:51
 * @Version: 1.0
 */
public class HighSpeedrail extends Railway{
    int capacity=1000;
    int speed;
    public int getCapacity(){
        return capacity;
    }
    public void start(){
        System.out.println(getClass()+"启动");
        speed=60;
    }
    public void stop(){
        System.out.println(getClass()+"刹车");
        speed=0;
    }
    public void speedUp(){
        System.out.println(getClass()+"加速");
        speed=340;
    }
    public void speedDown(){
        System.out.println(getClass()+"减速");
        speed=210;
    }
}
